<template>
  <div class="screen">
    <header>
      售后质量看板
    </header>
    <main>
      <div class="aside">
        <div class="aside-item"></div>
        <div class="aside-item"></div>
        <div class="aside-item"></div>
      </div>
      <div class="content"></div>
    </main>
  </div>
</template>

<script>
export default {
  name: "index",
  activated() {
    this.init()
    document.querySelector(".ele-admin-content-view").style.height = "100%"
    this.refresh = true
    // console.log()
  },
  deactivated() {
    document.querySelector(".ele-admin-content-view").style.height = "auto"
  },
  methods: {
    init() {
      window.addEventListener("resize", this.resizeList)
      this.$once('hook:beforeDestroy', function () {
        window.removeEventListener('resize', this.resizeList)
      })
    },
    resizeList(event, args = this.$children) {
      const components = args
      if (components.length > 0) {
        components.forEach(component => {
          if (component.myEcharts) {
            component.myEcharts.resize()
          } else if (component.$children.length > 0) {
            this.resizeList(event, component.$children)
          }
        })
      }
    }
  }
}
</script>

<style lang="scss" scoped>
@import "src/styles/conversion.scss";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.screen {
  width: 100%;
  height: 100%;
  color: white;
  @include flex-column;
  @include bg-url("~@/assets/liyang/bg.png");


  header {
    width: 100%;
    height: px2vh(100);
    font-size: px2vw(30);
    font-weight: bolder;
    color: white;
    letter-spacing: px2vw(3);
    text-shadow: 0px 0px 30px rgba(0, 171, 255, 1);
    @include bg-url("~@/assets/liyang/head.png");
    @include flex-center;
  }

  main {
    flex: 6;
    padding: 0 px2vh(30) px2vh(20);
    margin-top: px2vh(-15);
    overflow: auto;
    @include flex-center;

    .aside {
      height: 100%;
      flex: 1;
      @include flex-center-column;

      .aside-item{
        width: 100%;
        flex: 1;
      }

      .aside-item:nth-of-type(1){
        flex: 1.25;
      }
    }

    .content {
      padding-top: px2vh(30);
      height: 100%;
      flex: 2.5;
    }
  }
}
</style>
